﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewTiff.aspx.cs" Inherits="Workflow.Web.ViewTiff" %>
<%--@ Page AspCompat="True" Language="C#" AutoEventWireup="true" CodeBehind="ViewTiff.aspx.cs" Inherits="Workflow.Web.ViewTiff" --%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>VIEW TIF</title>
    <link rel="stylesheet" type="text/css" href="Scripts/themes/base/jquery.ui.all.css" />
    <script type="text/javascript" src="Scripts/jquery-1.6.2.min.js"></script>
    <script src="Scripts/jquery.ui.core.js"></script>
    <script src="Scripts/jquery.ui.widget.js"></script>
    <script src="Scripts/jquery.ui.mouse.js"></script>
    <script src="Scripts/jquery.ui.slider.js"></script>
    <script src="Scripts/jQueryRotateCompressed.2.1.js" type="text/javascript"></script>
    <script src="Scripts/jquery.mousewheel.min.js" type="text/javascript"></script>
    <link href="Content/tiff.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
     
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="toolbar">
        <div id="toobaltitle">
            Toolbar</div>
        Zoom：<div id="zoom" style="width: 190px">
        </div>
        <asp:HyperLink runat="server" ID="_hlRot90" Text="Right" />&nbsp;
        <asp:HyperLink runat="server" ID="_hlRot270" Text="Left" />&nbsp;
        <asp:HyperLink runat="server" ID="_hlRot180" Text="vertical" />&nbsp;
             <asp:HyperLink runat="server" ID="_hlBig" Text="Big" />&nbsp;
            <asp:HyperLink runat="server" ID="_hlSmall" Text="Small" />&nbsp;<br />
        <br />
        <a href="#" onclick="location.reload();">Refresh</a>
    </div>
    <div align="center">
        <%-- // <asp:Table runat="server" ID="_tblImgs" Height="100%" Width="100%">
           // <asp:TableRow>
              //  <asp:TableCell Width="50%"  BorderColor="Black" BorderStyle="Solid" BorderWidth="2">--%>
        <%--//  </asp:TableCell>
             //   <asp:TableCell Width="50%">--%>
        <div id="viewer">
            <asp:PlaceHolder runat="server" ID="_plcBigImg" />
            <br />
         
            <asp:Label runat="server" ID="Label1" Text="" Font-Size="Small" /><br />
        </div>
        <div id="thumb">
            <asp:PlaceHolder runat="server" ID="_plcImgsThumbs" />
            <br />
            <asp:PlaceHolder runat="server" ID="_plcImgsThumbsPager" />
        </div>
        <%--   //   </asp:TableCell>
          //  </asp:TableRow>
      //  </asp:Table>--%>
    </div>
    </form>
    <script type="text/javascript">
        function ChangePg(Pg) {
            Src = 'ViewImg.aspx?View=1&FilePath=' + GetBigSrc("FilePath") + "&Pg=" + Pg + "&Height=" + GetBigSrc("Height") + "&Width=" + GetBigSrc("Width");
            SrcBig = 'ViewImg.aspx?View=1&FilePath=' + GetBigSrc("FilePath") + "&Pg=" + Pg + "&Height=" + 1000 + "&Width=" + 1000;
            SrcRevert = 'ViewImg.aspx?View=1&FilePath=' + GetBigSrc("FilePath") + "&Pg=" + Pg + "&Height=" + 600 + "&Width=" + 600;
            document.getElementById('_imgBig').src = Src;
            document.getElementById('_hlRot270').onclick = function () { ChangePg(Pg); document.getElementById('_imgBig').src = Src + "&Rotate=270"; };
            document.getElementById('_hlRot180').onclick = function () { ChangePg(Pg); document.getElementById('_imgBig').src = Src + "&Rotate=180"; };
            document.getElementById('_hlRot90').onclick = function () { ChangePg(Pg); document.getElementById('_imgBig').src = Src + "&Rotate=90"; };
            document.getElementById('_hlBig').onclick = function () { ChangePg(Pg); document.getElementById('_imgBig').src = SrcBig + "&Rotate" + GetBigSrc("Rotate"); };
            document.getElementById('_hlSmall').onclick = function () { ChangePg(Pg); document.getElementById('_imgBig').src = SrcRevert; };
        }

        function GetBigSrc(Qrystr) {
            var Qry = document.getElementById('_imgBig').src;
            //alert(Qry);
            gy = Qry.split("&");
            for (i = 0; i < gy.length; i++) {
                ft = gy[i].split("=");
                if (ft[0] == Qrystr)
                    return ft[1];
            }
        }
    </script>
    <script src="Scripts/tiff.js" type="text/javascript"></script>
</body>
</html>
